abstract class Animal {
    String name;
    String species;
    String breed;
    double price;

    public Animal(String name, String species, String breed, double price) {
        this.name = name;
        this.species = species;
        this.breed = breed;
        this.price = price;
    }

    public void eat() {
        System.out.println(name + " 正在吃饭。");
    }

    public void sleep() {
        System.out.println(name + " 正在睡觉。");
    }

    public void play() {
        System.out.println(name + " 正在玩耍。");
    }

    public abstract void shout();
}

class Cat extends Animal {
    boolean isPlaying;

    public Cat(String name, String species, String breed, double price) {
        super(name, species, breed, price);
        this.isPlaying = false;
    }

    @Override
    public void shout() {
        if (isPlaying) {
            System.out.println(name + " 喵喵叫！");
        } else {
            System.out.println(name + " 没有叫。");
        }
    }

    @Override
    public void play() {
        super.play();
        isPlaying = true;
        shout();
    }
}

class Dog extends Animal {

    public Dog(String name, String species, String breed, double price) {
        super(name, species, breed, price);
    }

    @Override
    public void shout() {
        System.out.println(name + " 汪汪叫！");
    }
}

public class Main {
    public static void main(String[] args) {
        Cat cat1 = new Cat("大猫", "猫", "老虎", 300);
        Cat cat2 = new Cat("小猫", "猫", "狸花猫", 250);

        Dog dog1 = new Dog("大狗", "狗", "萨摩耶", 500);
        Dog dog2 = new Dog("小狗", "狗", "哈士奇", 400);

        cat1.eat();
        cat1.play();
        cat1.shout();
        cat1.sleep();

        dog1.eat();
        dog1.shout();
        dog1.sleep();
    }
}
